home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 30
/
Mac Magazin and MacEasy Magazine CD - Issue 30.iso
/
utilities
/
Mac OS X
/
Flurry
/
Flurry source
/
Source Folder
/
Std.h
< prev
Wrap
C/C++ Source or Header
|
2002-01-25
|
2KB
|
86 lines
//-------------------------------------------------------------------
// File: Std.h
// Created: 02/12/00 9:01:PM
// Author: Aaron Hilton
// Comments: Standard header file to include all source files.
// (Precompiled header)
//-------------------------------------------------------------------
#ifndef __STD_h_
#define __STD_h_
#include <Carbon/Carbon.h>
#include <OpenGL/glu.h>
#include "PTypes.h"
extern double TICKSPERSECOND;
extern double fTime;
//extern double fTimeOffset;
extern double fDeltaTime;
//extern float intensity;
extern float gravity;
extern float sys_glWidth;
extern float sys_glHeight;
extern double sys_Time;
//extern HWND hWnd;
extern float drag;
extern int MouseX;
extern int MouseY;
extern int MouseDown;
typedef enum _ColorModes
{
redColorMode,
magentaColorMode,
blueColorMode,
cyanColorMode,
greenColorMode,
yellowColorMode,
slowCyclicColorMode,
cyclicColorMode,
tiedyeColorMode,
rainbowColorMode,
whiteColorMode,
multiColorMode,
darkColorMode
} ColorModes;
extern ColorModes currentColorMode;
extern float incohesion;
extern float colorIncoherence;
extern float streamSpeed;
extern float fieldCoherence;
extern float fieldSpeed;
extern int numParticles;
extern int starSpeed;
extern float seraphDistance;
extern float streamSize;
extern float streamExpansion;
extern float fieldRange;
extern float streamBias;
extern int numStreams;
extern double dframe;
#define MAXNUMPARTICLES 2500
extern float starfieldColor[MAXNUMPARTICLES*4*4];
extern float starfieldVertices[MAXNUMPARTICLES*2*4];
extern float starfieldTextures[MAXNUMPARTICLES*2*4];
extern int starfieldColorIndex;
extern int starfieldVerticesIndex;
extern int starfieldTexturesIndex;
inline float RandFlt(float min = 0.0f, float max = 1.0f)
{
return min + (max - min) * rand() / (float) RAND_MAX;
}
inline float RandBell(float scale)
{
if (scale != 0.0f)
{
return scale * (1.0f - (rand() + rand() + rand()) / ((float) RAND_MAX * 1.5f));
}
else
{
return 0.0f;
}
}
#endif // _STD_h_